<!DOCTYPE HTML>
<html lang="zh">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <meta content="no-cache" http-equiv="cache-control">
    <script type="text/javascript" src="/script/mootools.js"></script>
    <script type="text/javascript" src="/script/mootools-more.js"></script>
    <link rel="stylesheet" type="text/css" href="/script/jspxnet-ui.css"/>
    <script type="text/javascript" src="/script/jspxnet.js"></script>
    <script type="text/javascript" src="/script/jspxnet-ui-roc.js"></script>
    <link rel="stylesheet" type="text/css" href="/script/jspxnet-ui.css"/>
    <link href="/share/mskin/default/devcenter.css" rel="stylesheet" type="text/css"/>
    <link href="/script/highlighter/styles/shCore.css" rel="stylesheet" type="text/css"/>
    <link href="/script/highlighter/styles/shThemeDefault.css" rel="stylesheet" type="text/css"/>
    <script src="/script/vue.js"></script>
    <script type="text/javascript" src="/script/highlighter/scripts/shCore.js"></script>
    <script type="text/javascript" src="/script/highlighter/scripts/shBrushJava.js"></script>
    <script src="../SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
    <style>
        [v-cloak] {
            display: none;
        }

  		.sql {
		   width:50%;
		   height:200px;
        }
        .searchPanel {
            min-width: 300px;
            padding: 10 0 20px;
            margin: auto;
        }
	
    </style>
    <script type="text/javascript">
  
		function search(){
              var sql = $('sql').get('value');
              var camel = $('camel').get('value');			  
			  
			  if (!sql)
			  {
				  alert('sql没有填写');
				  return;
			  }
			  var posts = 
			  {
				 "sql": sql,
				 "camel": camel				 
		     };
		 
			  new Request.ROC({
                'url': '/devcenter/db/getsqlfields.jwc','data':posts,
                onSuccess: function (obj) {
                    if (obj.success) 
					{
                      $('content').set('html',' <pre class="brush:java;">'+obj.data + '</pre>');
					  (function(){
						    SyntaxHighlighter.config.clipboardSwf = 'scripts/highlighter/scripts/clipboard.swf';
                            SyntaxHighlighter.highlight();
					  }).delay(100);
                    } else {
                       alert(obj.message);
                    }
                }
            }).send();
        }
    </script>
    <title></title>
</head>
<body>
<div id="container" class="formContainer borderFieldset">
    <div id="header">
        <h1>sql数据库获取字段列表</h1>
        <div class="searchPanel">
          <label for="tableName">填写SQL</label><br>
		  <textarea name="sql" id="sql" class="sql" placeholder="sql"></textarea>
         <br>
          <select name="camel" size="1" id="camel">
            <option value="false" >原样</option>
            <option value="true">驼峰命名</option>
          
          </select>
       
          <button id="searchBtn" onClick="search();">确定</button>
        </div>
    </div>
	<div id="container" class="formContainer borderFieldset">
    
     	 <div id="content" >
         </div>         
	</div>
                
</div>
</body>
</html>
